/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_Studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once

#include <基本类型.h>
#include <vector>
#include <map>
#include <set>

#include "LLVM/LLVM_JIT.h"







/*class C_程序集 {


protected:


public:
	C_程序集();
	~C_程序集();

	

	std::map<std::wstring, class C_程序树*>	m_树;
	std::set<std::wstring>				m_类型声明;


	std::map<std::wstring, llvm::Value*> m_全局变量;
	std::map<std::wstring, llvm::Value*> m_全局常量;

};*/





class C_程序树 {


protected:
	//C_程序集* m_Root;

public:
	C_程序树();
	~C_程序树();

	std::set<std::wstring>				m_类型声明;


	std::wstring						m_函数名称;
	llvm::Type*							m_返回类型;
	std::vector<llvm::Type*>			m_参数;
	std::vector<S_类型名称>				m_in参数类型;
	std::vector<S_类型名称>				m_out参数类型;
	S_函数IR块							m_块;


	
	std::map<std::wstring, llvm::Value*> m_变量;
	std::map<std::wstring, llvm::Value*> m_常量;
	llvm::Value* m_返回变量;
	

	std::map<std::wstring, C_程序树*> m_子树;
};










